using System;

namespace Voodoo.Sauce.Internal.SDKs
{
	[Serializable]
	public class Adapter
	{
		public string version;

		public AdFormat banner;

		public AdFormat interstitial;

		public AdFormat rewardedVideo;

		public override bool Equals(object obj)
		{
			if (obj == null || GetType() != obj.GetType())
			{
				return false;
			}
			Adapter adapter = (Adapter)obj;
			if ((version ?? "") != (adapter.version ?? "") || ((banner == null || banner.IsEmpty()) && adapter.banner != null && !adapter.banner.IsEmpty()) || (banner != null && !banner.Equals(adapter.banner)) || ((interstitial == null || interstitial.IsEmpty()) && adapter.interstitial != null && !adapter.interstitial.IsEmpty()) || (interstitial != null && !interstitial.Equals(adapter.interstitial)) || ((rewardedVideo == null || rewardedVideo.IsEmpty()) && adapter.rewardedVideo != null && !adapter.rewardedVideo.IsEmpty()) || (rewardedVideo != null && !rewardedVideo.Equals(adapter.rewardedVideo)))
			{
				return false;
			}
			return true;
		}

		public override int GetHashCode()
		{
			return (((((((version != null) ? version.GetHashCode() : 0) * 397) ^ ((banner != null) ? banner.GetHashCode() : 0)) * 397) ^ ((interstitial != null) ? interstitial.GetHashCode() : 0)) * 397) ^ ((rewardedVideo != null) ? rewardedVideo.GetHashCode() : 0);
		}

		public bool IsEmpty()
		{
			if (string.IsNullOrEmpty(version) && (banner == null || banner.IsEmpty()) && (interstitial == null || interstitial.IsEmpty()) && (rewardedVideo == null || rewardedVideo.IsEmpty()))
			{
				return true;
			}
			return false;
		}
	}
}
